package net.chrisrichardson.cloudtools.maven.plugins;

import net.chrisrichardson.ec2deployer.cluster.ClusterManager;
import net.chrisrichardson.ec2deployer.cluster.SimpleCluster;

/**
 * Run Curl against Apache
 * @goal curl
 * @author cer
 *
 */
public class CurlMojo extends AbstractClusterMojo {

  /**
   * The path component of the url
   * 
   * @parameter expression="${cloudtools.curl.path}" 
   * @required
   */
  private String path;
  /**
   * HTTP method
   * 
   * @parameter expression="${cloudtools.curl.method}" 
   * @required
   */
  private String method;
  
  @Override
  protected void executeWithCluster(ClusterManager manager, SimpleCluster cluster) {
    cluster.getClusterInstance().getWebServerTier().curl(path, method);
  }

}
